package com.wsc.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "t_computers")
@AllArgsConstructor
@NoArgsConstructor
@Data
//电脑实体类
public class Computer {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;// 电脑编号
	private String name;// 电脑名称
	private String ip;// 电脑ip地址
	private Integer readroomid;// 阅览室
	private String remark;// 备注
	//@JsonIgnore
	//@OneToOne(cascade = CascadeType.ALL,optional=false)
	//@JsonIgnoreProperties("computer")
	//@JoinColumn(name = "readroomid", unique = true,insertable=false,updatable=false)
	//private ReadRoom readroom;
	//id name ip readroomid remark
}
